<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<script>
    var body = document.body;
    console.log(body);
     var arr = [
            {   
                name:"dai",
                age:19},
            
            {   
                name:"lisi",
                age:18}
        ]
    arr.forEach(item=>{
        var {name,age} = item;
        var p = document.createElement("p");
        var span = document.createElement("span")
        // var template = document.createElement("template")
        p.innerHTML = name;
        span.innerHTML = age;
        // var template = 
        // `
        // <p>${name}</p>
        // <p>${age}</p>
        // `
        body.prepend(p,span)
        console.log(p,span)
    })  
</script>
</body>
</html>